#include <iostream>
using namespace std;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  for (cin >> T; T; T--) {
    int n;
    int cnt0 = 0, cnt1 = 0;
    for (cin >> n; n; n--) {
      int a;
      cin >> a;
      if (a == 0) {
        cnt0++;
      } else if (a == -1) {
        cnt1++;
      }
    }
    cout << cnt0 + (cnt1 % 2) * 2 << "\n";
  }
  return 0;
}